<#assign module="chart"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
<style>
.table > thead > tr > th {
	    text-align:center;
	}
	.table > tbody > tr > td{
		vertical-align:middle;
		text-align:center;
	}
</style>
</@override>
<@override name="body">

	<div class="row">
	<div class="col-xs-13">
		<div class="col-md-2">
			<ul class="list-group">
				<#--
	        	<li class="list-group-item"><a  href="${ctx}/chart/heatMap">热力图</a></li>
	        	-->
				<@daijia>
				<li class="list-group-item"><a  href="${ctx}/chart/compositive">代驾订单汇总</a></li>
				</@daijia>
				<@pao>
				<li class="list-group-item"><a  href="${ctx}/chart/paotuiCompositive">跑腿订单汇总</a></li>
				</@pao>
				<@zhuan>
				<li class="list-group-item"><a  href="${ctx}/chart/zhuanCompositive">专车订单汇总</a></li>
				</@zhuan>
				<@freight>
				<li class="list-group-item"><a  href="${ctx}/chart/freightCompositive">货运订单汇总</a></li>
				</@freight>
				<@zhuanxian>
			<li class="list-group-item"><a  href="${ctx}/chart/zhuanxianCompositive">快车订单汇总</a></li>
			</@zhuanxian>
		        <li class="list-group-item"><a  href="${ctx}/chart/orderYearChart">订单统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/orderType">订单来源统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/memberOrder1">客户消费统计</a></li>
				<li class="list-group-item"><a  href="${ctx}/chart/tableNewMemberMonth">新增客户统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/driverOrder">服务人员业绩</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/introduce">推荐员工业绩</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/infoFee">保险费/信息费</a></li>
			    <@shiro.isMainCompany>
			    <li class="list-group-item"><a  href="${ctx}/chart/companyOrder">公司统计</a></li>
			    </@shiro.isMainCompany>
			   <!-- <li class="list-group-item"><a  href="${ctx}/chart/activity">活动统计</a></li> -->
			    <li class="list-group-item"><a  href="${ctx}/chart/driverTime">服务人员在线时间统计</a></li>
			</ul>

		</div>
		 </div>
		<div class="col-md-10">
		
			<div role="tabpanel">
			    <div class="tab-content">
				    <div role="tabpanel" class="tab-pane fade in active" id="daijiaTab">
				    	<div class="row margin-top">
							<div class="col-xs-12">
								<form class="form-inline" id="SearchForm" method="get">
								
									<div class="input-group">
										<input id="startTime" name="startTime" type="text" class="form-control" placeholder="开始时间" value="${startTime?if_exists}" />
									</div>
									
								  	<div class="form-group">
								  		<input id="endTime" name="endTime" type="text" class="form-control" placeholder="结束时间" value="${endTime?if_exists}" />
								    </div>
								    
								    <div class="form-group">
								        <button type="button" id="search_button" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> 查询</button>
								   		<button id="export_button" type="button" class="btn btn-primary col-sm-offset-0"><i class="glyphicon glyphicon-save"></i>导出</button>
								    </div>
								
							    </form>
						    </div>
					    </div>
			
						<ul id="pagination" class="pagination pull-left pagination-sm pagedata">
	   					</ul>
   									  
						<div class="row margin-top">
							<div class="col-xs-12">
								<div class="table-responsive">
									<div class="panel panel-primary">
									  <table class="table table-hover  table-bordered">
									  	<thead>
									  		<tr style="font-size:14px;">
									  			<th>#</th>
									  			<@daijia>
										  			<@shiro.hasPermission name='order'>
										  				<th colspan='3'>代驾</th>
										  			</@shiro.hasPermission>
									  			</@daijia>
									  			<@zhuan>  
										  		   	<@shiro.hasPermission name='zhuan'>
										  		    	<th colspan='3'>专车</th>
				       							   	</@shiro.hasPermission>
											 	</@zhuan>
									  	    	<@pao>		
										  		   	<@shiro.hasPermission name='errand'>
										  		    	<th colspan='3'>跑腿</th>
				      							   	</@shiro.hasPermission>
									  		 	</@pao>
									  		 	<@freight>  
										  		   	<@shiro.hasPermission name='freight'>
										  		    	<th colspan='3'>货运</th>
				       							   	</@shiro.hasPermission>
											 	</@freight>
									  		 	<@zhuanxian>  
										  		   	<@shiro.hasPermission name='zhuanxian'>
										  		    	<th colspan='3'>快车</th>
				       							   	</@shiro.hasPermission>
											 	</@zhuanxian>
											</tr>
									  	</thead>
									  	<tbody>
									  	<tr>
									  		<td>公司名称</td>
									  		<@daijia>
										  		<@shiro.hasPermission name='order'>
										  			<td>完成单量</td><td>销单量</td><td>订单金额</td>
										  		</@shiro.hasPermission>
									  		</@daijia>
									  		<@zhuan>
										  	    <@shiro.hasPermission name='zhuan'>
										  	    	<td>完成单量</td><td>销单量</td><td>订单金额</td>
										  	    </@shiro.hasPermission>
									  	   	</@zhuan>
									  	   	<@pao>
										  	    <@shiro.hasPermission name='errand'>
										  	    	<td>完成单量</td><td>销单量</td><td>订单金额</td>
										  	    </@shiro.hasPermission>
									  	   	</@pao>
									  	   	<@freight>
										  	    <@shiro.hasPermission name='freight'>
										  	    	<td>完成单量</td><td>销单量</td><td>订单金额</td>
										  	    </@shiro.hasPermission>
										  	</@freight>
									  	   	<@zhuanxian>
										  	    <@shiro.hasPermission name='zhuanxian'>
										  	    	<td>完成单量</td><td>销单量</td><td>订单金额</td>
										  	    </@shiro.hasPermission>
										  	</@zhuanxian>
									  	 <tr>
									  	   	
									  	 <#list result as company>
								  	 		<#if (company.companyName=="总计")>
									  	    	<tr style="font-weight:700;" class="warning"><td style="color:#ff950b;">${company.companyName}</td>
										  	    	<@daijia>
											  			<@shiro.hasPermission name='order'>
										  	       			<td style="color:#ff950b;">${company.finishNums}</td><td style="color:#ff950b;">${company.cancelNums}</td><td style="color:#ff950b;">${company.money}</td>
										  	   			</@shiro.hasPermission>
										  			</@daijia>
										  			<@zhuan> 
											  	    	<@shiro.hasPermission name='zhuan'>
											  	    		<td style="color:#ff950b;">${company.zhuanche.finishNums}</td><td style="color:#ff950b;">${company.zhuanche.cancelNums}</td><td style="color:#ff950b;">${company.zhuanche.money}</td>
											  	    	</@shiro.hasPermission>
										  	   		</@zhuan>
										  	   		<@pao>
										  	    		<@shiro.hasPermission name='errand'>
										  	    			<td style="color:#ff950b;">${company.errand.finishNums}</td><td style="color:#ff950b;">${company.errand.cancelNums}</td><td style="color:#ff950b;">${company.errand.money}</td>
										  	    		</@shiro.hasPermission>
										  	   		</@pao>
										  	    	<@freight> 
										  	    		<@shiro.hasPermission name='freight'>
										  	    			<td style="color:#ff950b;">${company.freight.finishNums}</td><td style="color:#ff950b;">${company.freight.cancelNums}</td><td style="color:#ff950b;">${company.freight.money}</td>
										  	    		</@shiro.hasPermission>
										  	   		</@freight> 
										  	    	<@zhuanxian> 
										  	    		<@shiro.hasPermission name='zhuanxian'>
										  	    			<td style="color:#ff950b;">${company.zhuanxian.finishNums}</td><td style="color:#ff950b;">${company.zhuanxian.cancelNums}</td><td style="color:#ff950b;">${company.zhuanxian.money}</td>
										  	    		</@shiro.hasPermission>
										  	   		</@zhuanxian> 
									  	    	<tr>
									  	   <#else>
									  	   		<tr>
										  	   		<td>${company.companyName}</td>
										  	   		<@daijia>
													  	<@shiro.hasPermission name='order'>
											  	   			<td>${company.finishNums}</td><td>${company.cancelNums}</td><td>${company.money}</td>
												  	   	</@shiro.hasPermission>
											  		</@daijia>
											  		<@zhuan> 
												  	    <@shiro.hasPermission name='zhuan'>
												  	    	<td>${company.zhuanche.finishNums}</td><td>${company.zhuanche.cancelNums}</td><td>${company.zhuanche.money}</td>
												  	    </@shiro.hasPermission>
											  	   	</@zhuan>
											  	   	<@pao>
												  	    <@shiro.hasPermission name='errand'>
												  	    	<td>${company.errand.finishNums}</td><td>${company.errand.cancelNums}</td><td>${company.errand.money}</td>
												  	    </@shiro.hasPermission>
											  	   	</@pao>
											  	   	<@freight> 
												  	    <@shiro.hasPermission name='freight'>
												  	    	<td>${company.freight.finishNums}</td><td>${company.freight.cancelNums}</td><td>${company.freight.money}</td>
												  	    </@shiro.hasPermission>
											  	   	</@freight>
											  	   	<@zhuanxian> 
												  	    <@shiro.hasPermission name='zhuanxian'>
												  	    	<td>${company.zhuanxian.finishNums}</td><td>${company.zhuanxian.cancelNums}</td><td>${company.zhuanxian.money}</td>
												  	    </@shiro.hasPermission>
											  	   	</@zhuanxian>
										  	    <tr>
									   		</#if>
									  	</#list> 
									  		
									  	</tbody>
									  </table>
									  
									  <ul class="pagination pull-left pagination-sm pageshow">
									  	<li><a>共 ${totalElements!0} 条数据</a></li>
									  </ul>
									  <ul class="pagination pull-left pagination-sm pagedata">
									  </ul>
   									  
									</div>
								</div>
							</div>
						</div>
				    </div>
			</div>
			 
		</div>
		
	</div>
</div>

</@override>


<@override name="footer">
<script src="${ctx}/assets/js/bootstrap-datetimepicker.min.js"></script>
<script src="${ctx}/assets/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${ctx}/assets/js/jquery.paging.min.js"></script>
<script src="${ctx}/assets/js/chart/companyOrder.js"></script>
</@override>
<@extends name="../layout.ftl"/>
